﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Entity
{
    public class User
    {
        /// <summary>
        /// ⽤户ID（⾃增主键）
        /// </summary>
        [Key]
        [Required]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int user_id { get; set; }

        /// <summary>
        /// 手机号
        /// </summary>
        [Required]
        [StringLength(11)]
        public string? moblie { get; set; }

        /// <summary>
        /// 加密后的密码
        /// </summary>
        [Required]
        [StringLength(128)]
        public string? password_hash { get; set; }

        /// <summary>
        /// ⽤户昵称
        /// </summary>

        [StringLength(64)]
        public string? nickname { get; set; }

        /// <summary>
        /// 最后登录时间
        /// </summary>


        public DateTime last_login { get; set; }

        /// <summary>
        /// 姓名——姓
        /// </summary>
        [Required]
        public string? FirstName { get; set; }

        /// <summary>
        /// 姓名——名
        /// </summary>
        [Required]
        public string? LastName { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        [Required]

        public string? Email { get; set; }
    }
}
